import request from '@/utils/request'

// 创建商品属性值
export function createGoodsAttributeValue(data) {
  return request({
    url: '/supplier/goods-attribute-value/create',
    method: 'post',
    data: data
  })
}

// 更新商品属性值
export function updateGoodsAttributeValue(data) {
  return request({
    url: '/supplier/goods-attribute-value/update',
    method: 'put',
    data: data
  })
}

// 删除商品属性值
export function deleteGoodsAttributeValue(id) {
  return request({
    url: '/supplier/goods-attribute-value/delete?id=' + id,
    method: 'delete'
  })
}

// 获得商品属性值
export function getGoodsAttributeValue(id) {
  return request({
    url: '/supplier/goods-attribute-value/get?id=' + id,
    method: 'get'
  })
}

// 获得商品属性值分页
export function getGoodsAttributeValuePage(query) {
  return request({
    url: '/supplier/goods-attribute-value/page',
    method: 'get',
    params: query
  })
}

// 导出商品属性值 Excel
export function exportGoodsAttributeValueExcel(query) {
  return request({
    url: '/supplier/goods-attribute-value/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
